package com.example.Lezedata.ui.activity.setting;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.example.Lezedata.R;
import com.example.Lezedata.dataManager.GBUserManager;
import com.example.Lezedata.ui.activity.baseClass.GBBaseVc;

public class AccountSecurity extends GBBaseVc {

    TextView Password_Setting;
    TextView PIN_Setting;
    TextView Privacy;
    @Override
    protected int getLayoutId() {
        return R.layout.activity_account_security;
    }

    @Override
    public CharSequence title() {
        return "Account and Security";
    }

    @Override
    protected void viewDidLoad() {
        super.viewDidLoad();
        Password_Setting = findViewByTag("Password_Setting");
        PIN_Setting = findViewByTag("PIN_Setting");
        Privacy = findViewByTag("Privacy");

        Password_Setting.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                jumpActivity(PassWordSettingVc.class);
            }
        });

        PIN_Setting.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (GBUserManager.instance().hasPIN){
                    jumpActivity(PinUpdateVc.class);
                }else {
                    jumpActivity(PinSettingVc.class);
                }
            }
        });

        Privacy.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

            }
        });
    }
}